package xyz.hzxiao.utils;


import xyz.hzxiao.result.JsonResult;

/**
 * @Author: scy
 * @Date: 2022-10-13 11:08
 */
public class RemoteResultCheck<T> {

    public static <T> T check(JsonResult<T> result) {
        if (result.getSuccess()) {
            return result.getData();
        }
        throw new RuntimeException(result.getMessage());
    }
}
